<script setup lang="ts">
import { useSystemStore } from '@/store'

const systemStore = useSystemStore()

function handleToggleTheme() {
  systemStore.toggleDarkMode()
}
</script>

<template>
  <div class="bg-white dark:bg-gray-900 w-screen h-screen">
    <h1 class="py-5 flex items-center justify-center text-gray-600 dark:text-white">
      <div class="i-tabler:stretching-2 w-1em h-1em"></div>
      Hello World
    </h1>
    <div class="flex justify-center mt-5">
      <button
        class="px-2 py-1 bg-blue text-white"
        @click="handleToggleTheme"
      >
        切换主题
      </button>
    </div>
  </div>
</template>
